﻿using System;
using System.Reflection;
using System.Configuration;
using IDAL.Cms;
namespace DataFactory.Cms
{
    /// <summary>
    /// 工厂层，网站配置
    /// </summary>
    public partial class DataAccess : BaseDataAccess
    {
        private DataAccess() { }
        /// <summary>
        /// 创建区块映射表
        /// </summary>
        /// <returns></returns>
        public static IBlock CreateBlock()
        {
            ClassName = PATH + ".Cms.BlockDAL";
            return (IBlock)CreateFactory();
        }

        /// <summary>
        /// 创建术语表映射
        /// </summary>
        /// <returns></returns>
        public static INode CreateNode()
        {
            ClassName = PATH + ".Cms.NodeDAL";
            return (INode)CreateFactory();
        }

        /// <summary>
        /// 创建下载资源映射
        /// </summary>
        /// <returns></returns>
        public static IResource CreateResource()
        {
            ClassName = PATH + ".Cms.ResourceDAL";
            return (IResource)CreateFactory();
        }

        /// <summary>
        /// 创建新闻映射
        /// </summary>
        /// <returns></returns>
        public static INews CreateNews()
        {
            ClassName = PATH + ".Cms.NewsDAL";
            return (INews)CreateFactory();
        }
    }
}
